export function getAngle(p1,p2,p3){
    const getAngle = (ps,pe) => {
        const dot = ps[0] * pe[0] + ps[1] * pe[1]
        const det = ps[0] * pe[1] - ps[1] * pe[0]
        const angle = Math.atan2(det, dot) / Math.PI * 180
        return Math.round(angle + 360) % 360
    }
    return getAngle({
        x: p1[0] - p2[0],
        y: p1[1] - p2[1],
    }, {
        x: p3[0] - p2[0],
        y: p3[1] - p2[1],
    });
}